package com.cn.xiaonuo.slbfinances.slbproxys.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.slbfinances.slbproxys.service.ICoverageProxyInfoService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

@RestController
public class CoverageProxyInfoController {
    @Resource
    private ICoverageProxyInfoService coverageProxyInfoService;

    @ApiOperation(value = "财务管理-进账--农家餐饮--全部订单交易--查看详情", notes = "财务管理-进账--农家餐饮--全部订单交易--查看详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "serialNumber", value = "订单编号（String）", required = true,example = "10086")
    })
    @RequestMapping(value = "/api/coverageproxyinfo/successOrderInfoOne", method = RequestMethod.POST)
    public BusinessMessage successOrderInfoOne(String serialNumber) {
        return coverageProxyInfoService.successOrderInfoOne(serialNumber);
    }

    @ApiOperation(value = "财务管理-进账--农家餐饮--全部订单交易--订单列表", notes = "财务管理-进账--农家餐饮--全部订单交易--订单列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "beginTime", value = "开始时间（Long）",example = "102546554"),
            @ApiImplicitParam(name = "endTime", value = "结束时间（Long）",example = "302546554"),
            @ApiImplicitParam(name = "pageNo", value = "第几页（Integer）", required = true,example = "1"),
            @ApiImplicitParam(name = "pageSize", value = "每页长度（Integer）", required = true,example = "10")
    })
    @RequestMapping(value = "/api/coverageproxyinfo/successOrderInfoList", method = RequestMethod.POST)
    public BusinessMessage successOrderInfoList(Integer pageSize, Integer pageNo, Long beginTime, Long endTime) {
        return coverageProxyInfoService.successOrderInfo(pageSize, pageNo, beginTime, endTime);
    }

    @ApiOperation(value = "财务管理-进账--农家餐饮--商家入驻--进账明细", notes = "财务管理-进账--农家餐饮--商家入驻--进账明细")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "beginTime", value = "开始时间（Long）",example = "102546554"),
            @ApiImplicitParam(name = "endTime", value = "结束时间（Long）",example = "302546554"),
            @ApiImplicitParam(name = "realName", value = "姓名（String）",example = "张三"),
            @ApiImplicitParam(name = "phone", value = "联系方式（String）",example = "13800138000"),
            @ApiImplicitParam(name = "recordWay", value = "记录方式:1.线上 2.人工（String）",example = "1"),
            @ApiImplicitParam(name = "pageNo", value = "第几页（Integer）", required = true,example = "1"),
            @ApiImplicitParam(name = "pageSize", value = "每页长度（Integer）", required = true,example = "10")
    })
    @RequestMapping(value = "/api/coverageproxyinfo/receiptsDetail", method = RequestMethod.POST)
    public BusinessMessage receiptsDetail(Integer pageSize, Integer pageNo, Long beginTime, Long endTime, String realName, String phone, String recordWay) {
        return coverageProxyInfoService.receiptsDetail(pageSize, pageNo, beginTime, endTime, realName, phone, recordWay);
    }

    @ApiOperation(value = "财务管理-进账--农家餐饮--商家入驻--列表", notes = "财务管理-进账--农家餐饮--商家入驻--列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "checkTime", value = "审核时间（Long）",example = "102546554"),
            @ApiImplicitParam(name = "status", value = "状态 1.有效 2.失效（String）",example = "1"),
            @ApiImplicitParam(name = "realName", value = "姓名（String）",example = "张三"),
            @ApiImplicitParam(name = "phone", value = "联系方式（String）",example = "13800138000"),
            @ApiImplicitParam(name = "name", value = "公司名称（String）",example = "搜了宝"),
            @ApiImplicitParam(name = "pageNo", value = "第几页（Integer）", required = true,example = "1"),
            @ApiImplicitParam(name = "pageSize", value = "每页长度（Integer）", required = true,example = "10")
    })
    @RequestMapping(value = "/api/coverageproxyinfo/merchantsInfo", method = RequestMethod.POST)
    public BusinessMessage merchantsInfo(Integer pageSize, Integer pageNo, String createTime, String endTime,String status, String name, String realName, String phone) {
        return coverageProxyInfoService.merchantsInfo(pageSize, pageNo, createTime,endTime, status, name, realName, phone);

    }

}

